package lc.数组;

/**
 * @description: //把数组中的 0 移到末尾
 * @author: qian
 * @createDate: 2021/8/25
 */
public class Math283 {

    public void moveZeroes(int[] nums) {

        int inx = 0;
        for (int num : nums) {
            if (num != 0) {
                nums[inx] = num;
                inx++;
            }
        }
        while (inx < nums.length) {
            nums[inx] = 0;
            inx++;
        }
    }
}
